package org.example.service;

import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * TopicExchange模式消息的接收
 *
 *@ClassName: TopicTotalReceiver
 *@Author: CJ
 *@Date: 2021-9-24 1:01
 */
@Slf4j
@Component
@RabbitListener(queues = {"topic.woman"})
public class TopicTotalReceiver {

    @RabbitHandler
    public void process(@NotNull Map<String, Object> testMessage) {
        log.info("TopicTotalReceiver消费者收到消息: " + testMessage.toString());
    }
}
